package com.lframework.xingyun.basedata.vo.member;

import lombok.Data;
import com.lframework.starter.web.core.components.validation.IsNumberPrecision;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import com.lframework.starter.web.core.vo.BaseVo;
import javax.validation.constraints.NotNull;
import com.lframework.starter.web.core.components.validation.TypeMismatch;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;

@Data
public class UpdateMemberCouponVo implements BaseVo, Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @ApiModelProperty(value = "ID", required = true)
    @NotBlank(message = "id不能为空！")
    private String id;

    /**
     * 会员id
     */
    @ApiModelProperty(value = "会员id", required = true)
    @NotBlank(message = "请输入会员id！")
    @Length(message = "会员id最多允许32个字符！")
    private String memberId;

    /**
     * 卡券id
     */
    @ApiModelProperty(value = "卡券id", required = true)
    @NotBlank(message = "请输入卡券id！")
    @Length(message = "卡券id最多允许32个字符！")
    private String couponId;

    /**
     * 过期实际
     */
    @ApiModelProperty(value = "过期实际", required = true)
    @TypeMismatch(message = "过期实际格式有误！")
    @NotNull(message = "请输入过期实际！")
    private LocalDateTime expiryDate;

    /**
     * 状态（0:封存; 1:有效; 2:用尽; 3:过期;）
     */
    @ApiModelProperty(value = "状态（0:封存; 1:有效; 2:用尽; 3:过期;）", required = true)
    @TypeMismatch(message = "状态（0:封存; 1:有效; 2:用尽; 3:过期;）格式有误！")
    @NotNull(message = "请输入状态（0:封存; 1:有效; 2:用尽; 3:过期;）！")
    private Integer couponStatus;

    /**
     * 总值
     */
    @ApiModelProperty(value = "总值", required = true)
    @TypeMismatch(message = "总值格式有误！")
    @NotNull(message = "请输入总值！")
    @IsNumberPrecision(message = "总值最多允许2位小数！", value = 2)
    private BigDecimal totalValue;

    /**
     * 增值比率
     */
    @ApiModelProperty(value = "增值比率", required = true)
    @TypeMismatch(message = "增值比率格式有误！")
    @NotNull(message = "请输入增值比率！")
    @IsNumberPrecision(message = "增值比率最多允许2位小数！", value = 2)
    private BigDecimal added;

    /**
     * 可用值
     */
    @ApiModelProperty(value = "可用值", required = true)
    @TypeMismatch(message = "可用值格式有误！")
    @NotNull(message = "请输入可用值！")
    @IsNumberPrecision(message = "可用值最多允许2位小数！", value = 2)
    private BigDecimal allowValue;

}

